package com.blb.zy_community.service.impl;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.blb.zy_community.entity.ZyOwnerRoom;
import com.blb.zy_community.mapper.ZyOwnerRoomMapper;
import com.blb.zy_community.service.IZyOwnerRoomService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * <p>
 * 房屋绑定表  服务实现类
 * </p>
 *
 * @author 二组
 * @since 2023-06-18
 */
@Service
public class ZyOwnerRoomServiceImpl extends ServiceImpl<ZyOwnerRoomMapper, ZyOwnerRoom> implements IZyOwnerRoomService {

    @Autowired
    private ZyOwnerRoomMapper zyOwnerRoomMapper;
    @Override
    public Page<ZyOwnerRoom> selectZyOwnerRoom(Page<ZyOwnerRoom> page,String roomStatus,String communityId) {
        return zyOwnerRoomMapper.selectZyOwnerRoomPage(page,roomStatus,communityId);
    }

    @Override
    public List<ZyOwnerRoom> selectZyOwnerRoom(Long ownerRoomId) {
        return zyOwnerRoomMapper.selectZyOwnerRoom(ownerRoomId);
    }

    @Override
    public void updateOwnerRoom(ZyOwnerRoom zyOwnerRoom) {
        zyOwnerRoomMapper.updateZyOwnerRoom(zyOwnerRoom);
    }

    @Override
    public List<ZyOwnerRoom> selectByOwnerId(Long id) {
        return zyOwnerRoomMapper.selectByOwnerId(id);
    }
}
